import sys
# file = sys.stdout
# file.write('wcsndm ')
# print('wcsndm2')


file=open("1.txt",'r')
print(file.read(3))

with open('1.txt','r') as file2:
    print(file2.readline())

with open('2.txt', 'w',encoding='utf-8') as file3:
    file3.write('666666666666666')

list3=['hello','word']
with open('2.txt', 'a',encoding='utf-8') as file4:
    file4.writelines(list3)


file=open("1.txt",'rb')
print(file.read(1))
print(file.read(2))
print(file.read(3))
print(file.tell())
print(file.seek(2,1))


